import request from '../utils/request';

// http://localhost:8081/api/v1/event-reviews/list?eventId=11&page=2&pageSize=15
export const getEventReviewListService = (params) => {
  return request.get('/event-reviews/list', {
    params
  });
};

// POST http://localhost:8081/api/v1/event-reviews
export const createEventReviewService = (data) => {
  return request.post('/event-reviews', data);
};

//post http://localhost:8081/api/v1/event-reviews/{{eventReviewId}}/toggle-like
export const toggleEventReviewLikeService = (eventReviewId) => {
  return request.post(`/event-reviews/${eventReviewId}/toggle-like`);
};

//DELETE http://localhost:8081/api/v1/event-reviews/{{reviewId}}
export const deleteEventReviewService = (reviewId) => {
  return request.delete(`/event-reviews/${reviewId}`);
};